namespace EyeOpen.Build
{
	using System.Collections.Generic;
	using System.Linq;

	public class MsBuilTaskConfigurer 
		: ITaskConfigurer<IMsBuildTask>
	{
		private readonly string solutionFilePath;

		private readonly string outDir;

		private readonly IEnumerable<string> targets;

		public MsBuilTaskConfigurer(string solutionFilePath, string outDir, IEnumerable<string> targets)
		{
			this.solutionFilePath = solutionFilePath;
			this.outDir = outDir;
			this.targets = targets;
		}

		public void Configure(IMsBuildTask task)
		{
			task.Projects = new[] { solutionFilePath };
			task.Targets = targets.ToArray();
			task.StopOnFirstFailure = false;
			////task.Properties = new[] { string.Format(@"OutputPath={0}", outDir) };
		}
	}
}